//package com.base.data.elasticsearch.util.gson;
//
//import com.google.gson.*;
//import com.base.data.elasticsearch.util.BaseDateUtil;
//
//import java.lang.reflect.Type;
//import java.util.Date;
//
//public class GsonAdapterDate implements JsonSerializer<Date>, JsonDeserializer<Date>, GsonBaseAdapter {
//
//    @Override
//    public Date deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
//        return BaseDateUtil.parseDateWithPattern(json.getAsString(),getPattern());
//    }
//
//    @Override
//    public JsonElement serialize(Date src, Type typeOfSrc, JsonSerializationContext context) {
//        return new JsonPrimitive(BaseDateUtil.format(src,getPattern()));
//    }
//}
